package Printer;

import java.awt.Color;
import java.awt.Font;

import javax.print.DocFlavor;
import javax.print.DocPrintJob;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.ServiceUIFactory;
import javax.print.attribute.Attribute;
import javax.print.attribute.AttributeSet;
import javax.print.attribute.PrintServiceAttribute;
import javax.print.attribute.PrintServiceAttributeSet;
import javax.print.event.PrintServiceAttributeListener;

public class PrinterTest implements PrintService{

	public static void main(String[] args) {
		
		PrinterTest test = new PrinterTest();
		
		PrintableContent content = new PrintableContent("Test-Druck",true,new Font("ARIAL", Font.BOLD,25));
		
		
		
		content.addLine("Erste Zeile ", new Font("ARIAL",Font.PLAIN,20), 0, Color.BLACK, Color.YELLOW);
		content.addLine("Zweite Zeile, dann eine leere Zeile ", new Font("ARIAL",Font.PLAIN,20), 0, Color.BLACK, Color.YELLOW);
		content.addLine("", new Font("ARIAL",Font.PLAIN,20), 0, Color.BLACK, Color.WHITE);
		content.addLine("Dritte Zeile ", new Font("ARIAL",Font.PLAIN,20), 0, Color.BLACK, Color.RED);
		
		Printer p1 = new Printer(content,true,15);
		
		PrintService [] ps = PrintServiceLookup.lookupPrintServices(null,null);
		
		System.out.println(ps.length);
		
		p1.print();
	}

	@Override
	public void addPrintServiceAttributeListener(
			PrintServiceAttributeListener arg0) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public DocPrintJob createPrintJob() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public <T extends PrintServiceAttribute> T getAttribute(Class<T> arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public PrintServiceAttributeSet getAttributes() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object getDefaultAttributeValue(Class<? extends Attribute> arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getName() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ServiceUIFactory getServiceUIFactory() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Class<?>[] getSupportedAttributeCategories() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object getSupportedAttributeValues(Class<? extends Attribute> arg0,
			DocFlavor arg1, AttributeSet arg2) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public DocFlavor[] getSupportedDocFlavors() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public AttributeSet getUnsupportedAttributes(DocFlavor arg0,
			AttributeSet arg1) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean isAttributeCategorySupported(Class<? extends Attribute> arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isAttributeValueSupported(Attribute arg0, DocFlavor arg1,
			AttributeSet arg2) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean isDocFlavorSupported(DocFlavor arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void removePrintServiceAttributeListener(
			PrintServiceAttributeListener arg0) {
		// TODO Auto-generated method stub
		
	}

}
